home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / orf.zip / ORF.DOC < prev    next >
Text File  |  1980-01-04  |  10KB  |  199 lines

  1. '=========================================================================
  2. '                  Copyright 1987, Frederick G. Volking
  3. '                        San Francisco, California
  4. '      Author may be contacted through Chrisma BBS at (415)349-6576
  5. '    This software released as "freeware" by the Author on July 1, 1987.
  6. '=========================================================================
  7. '         This code extracted from Omni-Tool-Box: Version:  1.1
  8. '=========================================================================
  9.  
  10.           ORF - Function: Cross Reference & Pretty Printing Source Code
  11. --------------------------------------------------------------------------
  12.  
  13. Purpose:  This function can preform two actions.
  14.  
  15.              1) It will provide a cross-reference listing of all
  16.                 variables, functions and labels used within a Turbo
  17.                 Basic source code file. INCLUDE files are also included
  18.                 and may be nested to any depth allowable by T-Basic.
  19.  
  20.              2) It will perform a "Pretty-Printing" of the Turbo Basic
  21.                 source code file. Meaning it will indent all generally
  22.                 accepted logical sections of code (FOR/NEXT - IF/END IF -
  23.                 WHILE/WEND - etc...)
  24.  
  25. Syntax:   This function is meant to be run as a compiled EXE program.
  26.           STRANGE AND MYSTERIOUS ACTIVITIES MAY OCCUR if you try to
  27.           run this program directly from Turbo Basic. The source is
  28.           provided simply as a means of allowing you to customize and
  29.           modify it as desired.
  30.  
  31.           First Compile ...... then Syntax for Usage from DOS:
  32.  
  33.           DOS> ORF tbasfile[.ext][,[orfile[.ext]],[prettyfile[.ext]],[orf#'s]]
  34.  
  35.           Where:   tbasfile[.ext]  is the Turbo Basic source code file.
  36.                                    If .extn is not specified then .BAS
  37.                                    will be automatically assumed.
  38.  
  39.                    orfile[.ext]    The name of the file to receive the
  40.                                    cross reference listing. If no file
  41.                                    name is supplied then a duplicate of
  42.                                    the tbasfile name will be automatically
  43.                                    assumed. If no extention is supplied
  44.                                    then an extention of .ORF will be
  45.                                    automatically assumed.
  46.  
  47.                    prettyfile[.ext] The name of the file to recieve the
  48.                                    newly created `Pretty' file. If no file
  49.                                    name is specified then a duplicate of the
  50.                                    tbasfile name will be automatically
  51.                                    assumed. If no extention is supplied
  52.                                    then an extention of .ORB will be
  53.                                    automatically assumed.
  54.  
  55.                    orf#'s?         If a 'Pretty-File' is being created
  56.                                    then setting this flag to "Y" will
  57.                                    force Physical Line Number Remarks
  58.                                    to be automatically added to the
  59.                                    `pretty' file when finished.
  60.  
  61. Installation: There are a variety of instalation parameters (See below).
  62.               Use of the installation option is only valid once the
  63.               program has been compiled to an EXE file. This is due to the
  64.               fact that the installer subroutine actually uses the EXE file
  65.               itself as the data file for receiving the default parameters.
  66.  
  67.               Thus to use the default parameter installation ability
  68.               the program must already be compiled to an EXE file and that
  69.               EXE file must reside on the current default directory.
  70.  
  71.               In effect, the EXE file Modifies itself via the installation
  72.               ability. To this end, if the 2nd code line of the program
  73.               (shown below) is modified before compilation then the
  74.               Installation Function will fail, because the EXE file is
  75.               searched for the occurance of the string "GINKLOV" and the
  76.               default parameters are written to the literal string space
  77.               immediately following that search string.
  78.  
  79.               INSTALLdefault$="GNIKLOVBASORFORBBAK 1 0 1 0    "
  80.                                ^^^^^^^|-----------------------|
  81.                                Search      Literal String
  82.  
  83. Running Installation:
  84.  
  85.      FIRST COMPILE THE PROGRAM! Then from DOS enter:
  86.  
  87.         DOS>   ORF  /d
  88.  
  89.      The OmniReference program will run, will notice the request flag
  90.      for installation "/d", and will drop into install mode. The following
  91.      screen will be shown;
  92.  
  93. ===screen======screen======screen======screen======screen======screen========
  94.  
  95.      OmniReference - Copyright 1987, Frederick Volking - Ver: 1.10.A
  96. -------------------------------------------------------------------------------
  97.                              Default Installer
  98. -------------------------------------------------------------------------------
  99.                                                           Original    Current
  100. 1. Default Source file Extention                               BAS  : BAS
  101. 2. Default Cross-Reference file Extention                      ORF  : ORF
  102. 3. Default Pretty file Extention                               ORB  : ORB
  103. 4. Default Back-Up file Extention                              BAK  : BAK
  104. 5. Request verification BEFORE Over-Writing any existing file?   Y  : Y
  105. 6. Rename old .BAS file to .BAK and rename .ORB to .BAS?         N  : N
  106. 7. Automatically do `pretty' of file?                            Y  : Y
  107. 8. Put Physical line number remarks in `pretty' Files?           N  : N
  108.  
  109. Enter Line# to change, <S>ave or <A>bort install:
  110.  
  111. ===screen======screen======screen======screen======screen======screen========
  112.  
  113.       There are 8 default parameters which may be set/reset with this
  114.       ability. Each parameter controls a different internal function
  115.       executed within the cross-referencer/pretty-printer itself.
  116.  
  117.       The display column labeled "Original" contains the original factory
  118.       settings for all parameters. (ie;the settings I thought best!)
  119.  
  120.       The display column labeled "Current" is just that; The the parameter
  121.       settings as they currently exist.
  122.  
  123.       To change a parameter, just type in the line number and the new
  124.       setting.
  125.  
  126. Default Parameter Descriptions:
  127.  
  128.       1. Default Source file Extention: Exactly what it says. In the case
  129.          that no file extention is specified, then this is the extention of
  130.          which will be automatically supplied.
  131.  
  132.       2. Default Cross-Reference file Extention: Same as above except this
  133.          is the default extention for the cross reference out put file.
  134.  
  135.       3. Default Pretty file Extention: Again same as above except this is
  136.          the `Pretty-file'.
  137.  
  138.       4. Default Back-Up file Extention: In the event you have parameter #6
  139.          set to "Yes" then the original file will be automatically renamed
  140.          to this file extention when the final renaming occurs.
  141.  
  142.       5. Request verification BEFORE Over-Writing any existing file? While
  143.          ORF is processing the source file, it will be writing a variety of
  144.          output files. If during this creation of these new files, ORF
  145.          happens to discover that a file already exists with the same name
  146.          it intends to use, do you want ORF to verify with you that it's
  147.          Okay to over-write the existing file? If you set this parameter
  148.          to "No" then ORF will not ask and will automatically overwrite any
  149.          existing files.
  150.  
  151.       6. Rename old .BAS file to .BAK and rename .ORB to .BAS? If ORF is
  152.          creates a new `pretty-print' file, would you like ORF to
  153.          automatically rename the old BASic source file to BAKup and the
  154.          new Pretty-File to BASic?
  155.  
  156.       7. Automatically do `pretty' of file? Shall ORF au